<template>
  <view>
    <uni-easyinput v-model="item.content" placeholder="计划做什么" />
    <calendar></calendar>
    <button type="default" @click="submit">保存</button>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        item: {
          "content": "",
          "user_id": "",
          "finish": false
        }
      }
    },
    onLoad() {

    },
    methods: {
      submit() {
        const db = uniCloud.database();
        db.collection('schedule').add(this.item).then(e => {
          console.log(e)
        })
        uni.$showMsg('添加成功')
      }
    }
  }
</script>

<style lang="scss">

</style>
